home *** CD-ROM | disk | FTP | other *** search
/ Object Oriented Applicat…isualAge for C++ for OS/2 / Object-Oriented Application Development with VisualAGE for C++ for OS2.iso / list.tab < prev    next >
Text File  |  1996-02-19  |  20KB  |  555 lines

  1.  
  2.  CREATE TABLE USERID.BUYER
  3.       (BUYER_ID CHAR(11) NOT NULL,
  4.        FIRST_NAME CHAR(20) NOT NULL,
  5.        LAST_NAME CHAR(20) NOT NULL,
  6.        MARRITAL_STATUS CHAR(1),
  7.        GENDER CHAR(1),
  8.        INCOME DECIMAL(15,2),
  9.        WORK_PHONE CHAR(12),
  10.        HOME_PHONE CHAR(12),
  11.        PRIMARY KEY (BUYER_ID));
  12.  
  13.  CREATE TABLE USERID.BUYER_ADDRESS
  14.       (ADDRESS_ID CHAR(11) NOT NULL,
  15.        STREET CHAR(40) NOT NULL,
  16.        AREA CHAR(40) NOT NULL,
  17.        CITY CHAR(40) NOT NULL,
  18.        STATE CHAR(2),
  19.        ZIP_CODE CHAR(5) FOR BIT DATA,
  20.        PRIMARY KEY ( ADDRESS_ID ));
  21.  
  22.  CREATE TABLE USERID.BUYER_LOG
  23.        (BUYER_ID CHAR(11) NOT NULL,
  24.         CREATION_TIMESTAMP TIMESTAMP,
  25.         LAST_UPDATE TIMESTAMP,
  26.         PRIMARY KEY ( BUYER_ID ));
  27.  
  28.  CREATE TABLE USERID.MARKETING_INFO
  29.        (PROPERTY_ID CHAR(5) NOT NULL,
  30.         PRICE DECIMAL(7,0) NOT NULL,
  31.         DAYS_ON_MARKET SMALLINT,
  32.         COMMISSION_RATE DECIMAL(5,2),
  33.         DOWN_PAYMENT_RATE DECIMAL(5,2),
  34.         PRIMARY KEY ( PROPERTY_ID ));
  35.  
  36.  CREATE TABLE USERID.MULTIDOC
  37.        (MULTIDOC_ID CHAR(5) NOT NULL,
  38.         FILENAME VARCHAR(254) NOT NULL,
  39.         TYPE CHAR(20) NOT NULL,
  40.         PRIMARY KEY (MULTIDOC_ID));
  41.  
  42.  CREATE TABLE USERID.PREFERENCE
  43.        (BUYER_ID CHAR(11) NOT NULL,
  44.         MAX_PRICE DECIMAL(15,2),
  45.         MIN_PRICE DECIMAL(15,2),
  46.         MAX_SIZE DECIMAL(15,2),
  47.         MIN_SIZE DECIMAL(15,2),
  48.         BEDROOMS SMALLINT,
  49.         BATHROOMS SMALLINT,
  50.         STORIES SMALLINT,
  51.         HEATING CHAR(30),
  52.         COOLING CHAR(30),
  53.         PRIMARY KEY (BUYER_ID));
  54.  
  55.  CREATE TABLE USERID.PROPERTY
  56.        (PROPERTY_ID CHAR(5) NOT NULL,
  57.         SIZE DECIMAL(5,0) NOT NULL,
  58.         BEDROOMS SMALLINT NOT NULL,
  59.         BATHROOMS SMALLINT NOT NULL,
  60.         STORIES SMALLINT NOT NULL,
  61.         COOLING CHAR(30) NOT NULL,
  62.         HEATING CHAR(30) NOT NULL,
  63.         DESCRIPTION VARCHAR(512),
  64.         PRIMARY KEY (PROPERTY_ID));
  65.  
  66.  CREATE TABLE USERID.PROPERTY_ADDRESS
  67.        (ADDRESS_ID CHAR(5) NOT NULL,
  68.         STREET CHAR(40) NOT NULL,
  69.         AREA CHAR(40),
  70.         CITY CHAR(40) NOT NULL,
  71.         STATE CHAR(2),
  72.         ZIP_CODE CHAR(5) FOR BIT DATA,
  73.         PRIMARY KEY (ADDRESS_ID));
  74.  
  75.  CREATE TABLE USERID.PROPERTY_LOG
  76.        (PROPERTY_ID CHAR(5) NOT NULL,
  77.         DOWNLOAD_TIMESTAMP TIMESTAMP NOT NULL,
  78.         LAST_UPDATE TIMESTAMP NOT NULL,
  79.         STATUS CHAR(15) NOT NULL,
  80.         PRIMARY KEY (PROPERTY_ID));
  81.  
  82.  CREATE TABLE USERID.SALE_TRANSACTION
  83.        (TRANSACTION_ID TIMESTAMP NOT NULL,
  84.         LAST_UPDATE TIMESTAMP NOT NULL,
  85.         AGREEMENT_FORM_ID INTEGER NOT NULL,
  86.         STATUS CHAR(10) NOT NULL,
  87.         BUYER_ID CHAR(11) NOT NULL,
  88.         PROPERTY_ID CHAR(5) NOT NULL,
  89.         PRIMARY KEY (TRANSACTION_ID));
  90.  
  91.  CREATE VIEW USERID.BUYER_INFO
  92.        (BUYER_ID,
  93.         FIRST_NAME,
  94.         LAST_NAME,
  95.         INCOME,
  96.         WORK_PHONE,
  97.         HOME_PHONE,
  98.         STREET,
  99.         AREA,
  100.         CITY,
  101.         STATE,
  102.         ZIP_CODE,
  103.         MAX_PRICE,
  104.         MIN_PRICE,
  105.         MAX_SIZE,
  106.         MIN_SIZE,
  107.         BEDROOMS,
  108.         BATHROOMS,
  109.         STORIES,
  110.         HEATING,
  111.         COOLING)
  112.         AS SELECT A.BUYER_ID,
  113.                   FIRST_NAME,
  114.                   LAST_NAME,
  115.                   INCOME,
  116.                   WORK_PHONE,
  117.                   HOME_PHONE,
  118.                   STREET,
  119.                   AREA,
  120.                   CITY,
  121.                   STATE,
  122.                   ZIP_CODE,
  123.                   MAX_PRICE,
  124.                   MIN_PRICE,
  125.                   MAX_SIZE,
  126.                   MIN_SIZE,
  127.                   BEDROOMS,
  128.                   BATHROOMS,
  129.                   STORIES,
  130.                   HEATING,
  131.                   COOLING
  132.                   FROM USERID.BUYER A,
  133.                   USERID.BUYER_ADDRESS B,
  134.                   USERID.PREFERENCE C
  135.                   WHERE (A.BUYER_ID=ADDRESS_ID
  136.                          AND A.BUYER_ID=C.BUYER_ID);
  137.  
  138.  CREATE VIEW USERID.PROP_AD_LOG
  139.        (PROPERTY_ID,
  140.         SIZE,
  141.         BEDROOMS,
  142.         BATHROOMS,
  143.         AREA,
  144.         CITY,
  145.         STATE,
  146.         STATUS,
  147.         PRICE,
  148.         COMMISSION_RATE,
  149.         DOWN_PAYMENT_RATE)
  150.         AS SELECT A.PROPERTY_ID,
  151.                   SIZE,
  152.                   BEDROOMS,
  153.                   BATHROOMS,
  154.                   AREA,
  155.                   CITY,
  156.                   STATE,
  157.                   STATUS,
  158.                   PRICE,
  159.                   COMMISSION_RATE,
  160.                   DOWN_PAYMENT_RATE
  161.                   FROM USERID.PROPERTY A,
  162.                        USERID.PROPERTY_ADDRESS B,
  163.                        USERID.PROPERTY_LOG C,
  164.                        USERID.MARKETING_INFO D
  165.                   WHERE (A.PROPERTY_ID=ADDRESS_ID AND
  166.                          A.PROPERTY_ID=C.PROPERTY_ID AND
  167.                          A.PROPERTY_ID=D.PROPERTY_ID);
  168.  
  169.  CREATE VIEW USERID.LIST_AREA
  170.        (AREA)
  171.         AS SELECT DISTINCT AREA
  172.                   FROM USERID.PROPERTY_ADDRESS A,
  173.                        USERID.PROPERTY_LOG B
  174.                   WHERE (ADDRESS_ID=PROPERTY_ID) AND
  175.                         ((STATUS='AVAILABLE'));
  176.  
  177.  INSERT INTO BUYER VALUES('612-45-6798',
  178.                           'Marc',
  179.                           'Carrel',
  180.                           'M',
  181.                           'M',
  182.                           5000,
  183.                           '408-448-4088',
  184.                           '408-927-5678');
  185.  
  186.  INSERT INTO BUYER VALUES('412-67-8856',
  187.                           'Isabelle',
  188.                           'Mauny',
  189.                           'S',
  190.                           'F',
  191.                           4000,
  192.                           '408-555-6789',
  193.                           '408-927-1238');
  194.  
  195.  INSERT INTO BUYER VALUES('567-56-1234',
  196.                           'Peter',
  197.                           'Jakab',
  198.                           'M',
  199.                           'M',
  200.                           7000,
  201.                           '445-678-3422',
  202.                           '434-927-5811');
  203.  
  204.  INSERT INTO BUYER VALUES('123-44-7823',
  205.                           'Rainer',
  206.                           'Vetter',
  207.                           'M',
  208.                           'M',
  209.                           8000,
  210.                           '456-467-6666',
  211.                           '445-927-2345');
  212.  
  213.  INSERT INTO BUYER VALUES('345-55-1111',
  214.                           'Paulette',
  215.                           'Sopper',
  216.                           'F',
  217.                           'M',
  218.                           5000,
  219.                           '445-423-4333',
  220.                           '456-927-9876');
  221.  
  222.  INSERT INTO BUYER VALUES('678-22-1118',
  223.                           'Guido',
  224.                           'De Simoni',
  225.                           'M',
  226.                           'S',
  227.                           5000,
  228.                           '408-448-2348',
  229.                           '466-927-1234');
  230.  
  231.  INSERT INTO BUYER_ADDRESS VALUES('612-45-6798',
  232.                                   '1089 Normington Way',
  233.                                   'Almaden',
  234.                                   'San Jose',
  235.                                   'CA',
  236.                                   '95136' );
  237.  
  238.  INSERT INTO BUYER_ADDRESS VALUES('412-67-8856',
  239.                                   '1234 Blossom Hill Road',
  240.                                   'Tenessee',
  241.                                   'Morgan Hill',
  242.                                   'CA',
  243.                                   '95136' );
  244.  
  245.  INSERT INTO BUYER_ADDRESS VALUES('567-56-1234',
  246.                                   '12 Harry Road',
  247.                                   'Tropico',
  248.                                   'Los Gatos',
  249.                                   'CA',
  250.                                   '95136');
  251.  
  252.  INSERT INTO BUYER_ADDRESS VALUES('123-44-7823',
  253.                                   '134 Onmy Way',
  254.                                   'New Island',
  255.                                   'Saratoga',
  256.                                   'CA',
  257.                                   '95136' );
  258.  
  259.  INSERT INTO BUYER_ADDRESS VALUES('345-55-1111',
  260.                                   '456 Quiche Way',
  261.                                   'Castro',
  262.                                   'San Francisco',
  263.                                   'CA',
  264.                                   '95136' );
  265.  
  266.  INSERT INTO BUYER_ADDRESS VALUES('678-22-1118',
  267.                                   '789 5th Avenue',
  268.                                   'Cherry Trees',
  269.                                   'New York',
  270.                                   'NY',
  271.                                   '95136' );
  272.  
  273.  INSERT INTO PREFERENCE VALUES('612-45-6798',
  274.                                3000,
  275.                                2000,
  276.                                300,
  277.                                200,
  278.                                2,
  279.                                4,
  280.                                1,
  281.                                'No Heating',
  282.                                'No Cooling');
  283.  
  284.  INSERT INTO PREFERENCE VALUES('412-67-8856',
  285.                                4000,
  286.                                3000,
  287.                                400,
  288.                                300,
  289.                                2,
  290.                                3,
  291.                                2,
  292.                                'Gas',
  293.                                'No Cooling');
  294.  
  295.  INSERT INTO PREFERENCE VALUES('567-56-1234',
  296.                                5000,
  297.                                4000,
  298.                                500,
  299.                                400,
  300.                                3,
  301.                                2,
  302.                                2,
  303.                                'Electric',
  304.                                'Room Air Conditioner');
  305.  
  306.  INSERT INTO PREFERENCE VALUES('123-44-7823',
  307.                                6000,
  308.                                5000,
  309.                                600,
  310.                                500,
  311.                                1,
  312.                                1,
  313.                                3,
  314.                                'Propane Gas',
  315.                                'Evaporative Cooler');
  316.  
  317.  INSERT INTO PREFERENCE VALUES('345-55-1111',
  318.                                7000,
  319.                                6000,
  320.                                700,
  321.                                600,
  322.                                1,
  323.                                3,
  324.                                2,
  325.                                'Solar',
  326.                                'No Cooling');
  327.  
  328.  INSERT INTO PREFERENCE VALUES('678-22-1118',
  329.                                8000,
  330.                                7000,
  331.                                800,
  332.                                700,
  333.                                5,
  334.                                4,
  335.                                1,
  336.                                'Oil',
  337.                                'Evaporative Cooler');
  338.  
  339.  INSERT INTO BUYER_LOG VALUES('612-45-6798',
  340.                               '1995-12-04-12.12.12.000000',
  341.                               '1995-12-04-12.12.12.000000');
  342.  
  343.  INSERT INTO BUYER_LOG VALUES('412-67-8856',
  344.                               '1995-12-04-12.12.12.000000',
  345.                               '1995-12-04-12.12.12.000000');
  346.  
  347.  INSERT INTO BUYER_LOG VALUES('567-56-1234',
  348.                               '1995-12-04-12.12.12.000000',
  349.                               '1995-12-04-12.12.12.000000');
  350.  
  351.  INSERT INTO BUYER_LOG VALUES('123-44-7823',
  352.                               '1995-12-04-12.12.12.000000',
  353.                               '1995-12-04-12.12.12.000000');
  354.  
  355.  INSERT INTO BUYER_LOG VALUES('345-55-1111',
  356.                               '1995-12-04-12.12.12.000000',
  357.                               '1995-12-04-12.12.12.000000');
  358.  
  359.  INSERT INTO BUYER_LOG VALUES('678-22-1118',
  360.                               '1995-12-04-12.12.12.000000',
  361.                               '1995-12-04-12.12.12.000000');
  362.  
  363.  INSERT INTO PROPERTY VALUES('11111',
  364.                              800,
  365.                              10,
  366.                              5,
  367.                              3,
  368.                              'No Heating',
  369.                              'No Cooling',
  370.                              'Big House with all the
  371.                              facilities. Garden a la Francaise.' );
  372.  
  373.  INSERT INTO PROPERTY VALUES('22222',
  374.                              700,
  375.                              5,
  376.                              3,
  377.                              2,
  378.                              'Gas',
  379.                              'No Cooling',
  380.                              'Two little houses with dependencies.
  381.                              Backyard and swimming pool.' );
  382.  
  383.  INSERT INTO PROPERTY VALUES('33333',
  384.                              600,
  385.                              4,
  386.                              2,
  387.                              2,
  388.                              'Electric',
  389.                              'Evaporative Cooler',
  390.                              'Painting gallery. completely
  391.                              remodeled. Great for exhibition.' );
  392.  
  393.  INSERT INTO PROPERTY VALUES('44444',
  394.                              500,
  395.                              3,
  396.                              2,
  397.                              1,
  398.                              'Propane Gas',
  399.                              'Room Air Conditioner',
  400.                              'The "Versailles" of the area.
  401.                              Many fountains a springs.
  402.                              Nice for showing off' );
  403.  
  404.  INSERT INTO PROPERTY VALUES('55555',
  405.                              400,
  406.                              2,
  407.                              1,
  408.                              1,
  409.                              'Solar',
  410.                              'Evaportative Cooler',
  411.                              'Clean and simple.
  412.                              But very affordable' );
  413.  
  414.  INSERT INTO PROPERTY VALUES('66666',
  415.                              300,
  416.                              1,
  417.                              1,
  418.                              1,
  419.                              'Oil',
  420.                              'No Cooling',
  421.                              'A best deal in
  422.                              this range of price!');
  423.  
  424.  INSERT INTO PROPERTY_ADDRESS VALUES('11111',
  425.                                      '1089 Normington Way',
  426.                                      'Almaden',
  427.                                      'San Jose',
  428.                                      'CA',
  429.                                      '95136' );
  430.  
  431.  INSERT INTO PROPERTY_ADDRESS VALUES('22222',
  432.                                      '1234 Blossom Hill Road',
  433.                                      'Tenessee',
  434.                                      'Morgan Hill',
  435.                                      'CA',
  436.                                      '95136' );
  437.  
  438.  INSERT INTO PROPERTY_ADDRESS VALUES('33333',
  439.                                      '12 Harry Road',
  440.                                      'Tropico',
  441.                                      'Los Gatos',
  442.                                      'CA',
  443.                                      '95136' );
  444.  
  445.  INSERT INTO PROPERTY_ADDRESS VALUES('44444',
  446.                                      '134 Onmy Way',
  447.                                      'New Island',
  448.                                      'Saratoga',
  449.                                      'CA',
  450.                                      '95136' );
  451.  
  452.  INSERT INTO PROPERTY_ADDRESS VALUES('55555',
  453.                                      '456 Quiche Way',
  454.                                      'Castro',
  455.                                      'San Francisco',
  456.                                      'CA',
  457.                                      '95136' );
  458.  
  459.  INSERT INTO PROPERTY_ADDRESS VALUES('66666',
  460.                                      '789 5th Avenue',
  461.                                      'Cherry Trees',
  462.                                      'New York',
  463.                                      'NY',
  464.                                      '95136' );
  465.  
  466.  INSERT INTO MARKETING_INFO VALUES('11111',
  467.                                    5672000,
  468.                                    5,
  469.                                    5.25,
  470.                                    5.5);
  471.  
  472.  INSERT INTO MARKETING_INFO VALUES('22222',
  473.                                    123000,
  474.                                    4,
  475.                                    8.40,
  476.                                    10.0);
  477.  
  478.  INSERT INTO MARKETING_INFO VALUES('33333',
  479.                                    500000,
  480.                                    9,
  481.                                    2.5,
  482.                                    6.5);
  483.  
  484.  INSERT INTO MARKETING_INFO VALUES('44444',
  485.                                    1000000,
  486.                                    1,
  487.                                    1.4,
  488.                                    3.5);
  489.  
  490.  INSERT INTO MARKETING_INFO VALUES('55555',
  491.                                    679000,
  492.                                    2,
  493.                                    5.75,
  494.                                    5.3);
  495.  
  496.  INSERT INTO MARKETING_INFO VALUES('66666',
  497.                                    1200000,
  498.                                    6,
  499.                                    1.25,
  500.                                    4.5);
  501.  
  502.  INSERT INTO PROPERTY_LOG VALUES('11111',
  503.                                  '1995-12-30-17.01.35.00000',
  504.                                  '1996-01-06-15.11.32.00000',
  505.                                  'AVAILABLE' );
  506.  
  507.  INSERT INTO PROPERTY_LOG VALUES('22222',
  508.                                  '1995-12-30-17.01.35.00000',
  509.                                  '1996-01-06-15.11.32.00000',
  510.                                  'AVAILABLE' );
  511.  
  512.  INSERT INTO PROPERTY_LOG VALUES('33333',
  513.                                  '1995-12-30-17.01.35.00000',
  514.                                  '1996-01-06-15.11.32.00000',
  515.                                  'AVAILABLE' );
  516.  
  517.  INSERT INTO PROPERTY_LOG VALUES('44444',
  518.                                  '1995-12-30-17.01.35.00000',
  519.                                  '1996-01-06-15.11.32.00000',
  520.                                  'AVAILABLE' );
  521.  
  522.  INSERT INTO PROPERTY_LOG VALUES('55555',
  523.                                  '1995-12-30-17.01.35.00000',
  524.                                  '1996-01-06-15.11.32.00000',
  525.                                  'AVAILABLE' );
  526.  
  527.  INSERT INTO PROPERTY_LOG VALUES('66666',
  528.                                  '1995-12-30-17.01.35.00000',
  529.                                  '1996-01-06-15.11.32.00000',
  530.                                  'AVAILABLE' );
  531.  
  532.  INSERT INTO MULTIDOC VALUES('11111',
  533.                              '',
  534.                              'VIDEO' );
  535.  
  536.  INSERT INTO MULTIDOC VALUES('22222',
  537.                              '',
  538.                              'VIDEO' );
  539.  
  540.  INSERT INTO MULTIDOC VALUES('33333',
  541.                              '',
  542.                              'VIDEO' );
  543.  
  544.  INSERT INTO MULTIDOC VALUES('44444',
  545.                              '',
  546.                              'VIDEO' );
  547.  
  548.  INSERT INTO MULTIDOC VALUES('55555',
  549.                              '',
  550.                              'VIDEO' );
  551.  
  552.  INSERT INTO MULTIDOC VALUES('66666',
  553.                              '',
  554.                              'VIDEO' );
  555.